<?php
// No direct access to this file
defined('_JEXEC') or die('Restricted access');

// import Joomla view library
jimport('joomla.application.component.view');

/**
 * HTML View class for the HelloWorld Component
 */
class BeViewApplicationPlanet extends JView {

	/**
	 * Default Index
	 */
	function display($tpl = null) {
		$application				= &JFactory::getApplication();
		$mApplicationPlanet = JModel::getInstance('ApplicationPlanet', 'BeModel');
		$mApplicationColony = JModel::getInstance('ApplicationColony', 'BeModel');

		$this->assign('tApplicationPlanet', $mApplicationPlanet->find(array(
			'id'	=> $application->input->getInt('id')
		)));

		$this->assign('cApplicationAction', $mApplicationPlanet->findallAction());

		// moeglich Kolonien auf dem Planeten
		$this->assign('cApplicationColony', $mApplicationColony->findall(array(
			'planet' => $application->input->getInt('id')
		)));

		parent::display($tpl);
	}
}
?>